﻿#ifndef SUBJECT_H
#define SUBJECT_H

#include <QList>

class Observer;

typedef QList<Observer*> ObserverList;

class Subject
{
public:
    Subject();

    void attach(Observer* observer);

    void detach(Observer* observer);

    void notify();

    virtual int getState() = 0;

    virtual void setState(int value) = 0;

private:
    ObserverList m_observerList;
};

#endif // SUBJECT_H
